/*    */ package com.chw.utils;
/*    */ 
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ 
/*    */ public class AjaxUtil
/*    */ {
/*    */   public static boolean checkIsAjax(HttpServletRequest request)
/*    */   {
/* 10 */     String requsetType = request.getHeader("x-requested-with");
/* 11 */     boolean isAjax = false;
/* 12 */     if ((requsetType != null) && (requsetType.equals("XMLHttpRequest"))) {
/* 13 */       isAjax = true;
/*    */     }
/* 15 */     request.setAttribute("isAjax", Boolean.valueOf(isAjax));
/* 16 */     return isAjax;
/*    */   }
/*    */ }

